#pragma once

class Level
{

public:
    enum class LevelType
    {
        UNKNOW = 0,
        DEBUG,
        INFO,
        WARN,
        ERROR,
        FATAL,
        OFF // 如果不想输出日志，直接把限制等级改成off(不进行相关日志打印只进行对应限制)
    };

    static const char *Tostring(LevelType level)
    {
        switch (level)
        {
        case LevelType::DEBUG:
            return "DEBUG";
        case LevelType::INFO:
            return "INFO";
        case LevelType::WARN:
            return "WARN";
        case LevelType::ERROR:
            return "ERROR";
        case LevelType::FATAL:
            return "FATAL";
        case LevelType::OFF:
            return "OFF";
        default:
            return "UNKNOWN";
        }
    }
};